package com.vencent.spring.aspectJ.test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.vencent.spring.aspectJ.bean.Person;

/**
 * aspectJ 的实例不是由Spring来创建管理， 所以要做一些处理如果有和spring打交道的时候。
 * factory-method 也许能帮助你
 * @author 1d
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:/com/vencent/spring/aspectJ/config/spring.xml")
public class SpringContext {
	
	@Autowired
	private Person per;
	
	@Test
	public void play(){
		per.playTime(4L);
	}
}
